/*
 * Tencent is pleased to support the open source community by making ovCompose available.
 * Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tencent.compose.sample.test

import androidx.compose.runtime.Immutable
import kotlinx.serialization.Serializable

/**
 * 测试消息数据模型
 */
@Immutable
@Serializable
data class TestMessage(
    val id: String,
    val senderId: Long,
    val receiverId: Long,
    val content: String,
    val type: MessageType,
    val timestamp: Long = System.currentTimeMillis(),
    val isRead: Boolean = false,
    val attachments: List<Attachment> = emptyList(),
    val replyTo: String? = null
)

/**
 * 消息类型枚举
 */
@Serializable
enum class MessageType(val displayName: String) {
    TEXT("文本"),
    IMAGE("图片"),
    VIDEO("视频"),
    AUDIO("音频"),
    FILE("文件"),
    LOCATION("位置"),
    SYSTEM("系统消息")
}

/**
 * 附件数据模型
 */
@Immutable
@Serializable
data class Attachment(
    val id: String,
    val name: String,
    val url: String,
    val size: Long,
    val mimeType: String,
    val thumbnailUrl: String? = null
)
